package com.mlog.njyjy.ndop.msg.common.domain;

import com.jfinal.plugin.activerecord.Model;
import com.mlog.njyjy.ndop.msg.common.domain.core.Timeable;
import com.mlog.njyjy.ndop.msg.common.support.Constants;
import com.mlog.njyjy.ndop.share.sql.annotation.Column;
import com.mlog.njyjy.ndop.share.sql.annotation.Id;
import com.mlog.njyjy.ndop.share.sql.annotation.Table;
import com.mlog.njyjy.ndop.share.sql.annotation.TableUnique;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 缓存中的项
 * </p>
 *
 * @author zyz
 * @version v1.0, 2020/8/7
 */
@Data
@Accessors(chain = true)
@Table(prefix = Constants.TBL_MSG_PREFIX, uniques = {@TableUnique(columns = {"msgKey", "msgValue"})},
        comment = "缓存中的项表")
public class MessageRecord extends Model<MessageRecord> implements Timeable {

    @Id
    private Long id;

    @Column(nullable = false, comment = "缓存的key")
    private String msgKey;

    @Column(nullable = false, length = 600, comment = "缓存的value")
    private String msgValue;

    @Column(updatable = false)
    private LocalDateTime createAt;

    private LocalDateTime updateAt;
    
    private String topic;
    private String source;
    private String type;
    private String pid;
    private String msg_id;
    private String fileNames;
    private LocalDateTime datetime;
    private String fileSizes;
    private String result;
    private String absoluteDataName;
}
